home *** CD-ROM | disk | FTP | other *** search
- From: jpotter@falcon.lhup.edu (John E. Potter)
- Message-ID: <4l2k94$79m@jake.esu.edu>
- X-Original-Date: 17 Apr 1996 11:22:12 GMT
- Path: in1.uu.net!bounce-back
- Date: 17 Apr 96 13:14:41 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: Interpretation Sought for DWP Concept of 'Valid Object'
- Organization: East Stroudsburg University, Pennsylvania
- References: <4kltuk$73j@bmtlh10.bnr.ca> <xso7mviv2g6.fsf@avs.cs.rpi.edu>
- X-Newsreader: TIN [version 1.2 PL2]
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMXTuyuEDnX0m9pzZAQGq4wGAjdzrx42YUuTWd+F9qGitWyUT32L+MzMB
- Pshf8q5EadhtrvrXXUKxDyyoaoB+oEfu
- =2cfe
-
- David Vandevoorde (vandevod@cs.rpi.edu) wrote:
- : >>>>> "JH" == "john (j d ) hickin" <hickin@bnr.ca> writes:
- : [...]
- : JH> A recent thread in another newsgroup has aroused some interest.
- : JH> Lately there has been a small debate around the interpretation of
- : JH> the following phrase, ostensibly taken from the DWP:
-
- : JH> A reference shall be initialized to refer to a valid object or
- : JH> function.
-
- : I checked and could find no such wording. Instead, I found:
-
- : [dcl.init.ref] 8.5.3/1
- : A variable declared to be a T&, that is
- : "reference to type T"
- : (_dcl.ref_), shall be initialized by an object, or function,
- : of type T
- : or by an object that can be converted into a T.
-
- : JH> One party claims that valid object means initialized object while
- : JH> another claims that all is required is that the object have a
- : JH> valid address.
-
- : JH> Does the DWP make it clear which interpretation should be used?
-
- : I'm not at all sure that the DWP uses the phrase `valid object' at
- : all. If it did, I would expect it to mean `an object whose lifetime
- : has begun and not expired'; the lifetime of an object is defined in
- : [basic.life].
-
- From April public draft.
-
- 8.3.2 [dcl.ref] /4
-
- "A reference shall be initialized to refer to a valid object or
- ^^^^^
- function. In particular, null references are prohibited; ..."
-
- IMHO it is a verbose lead-in to the next sentence which really says
- something.
-
- John
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-